﻿using AdoNetTest0002;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinFormstest0002
{
    public partial class test : Form
    {
        public test()
        {
            InitializeComponent();
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“admin3000DataSet.Users”中。您可以根据需要移动或删除它。
            //this.usersTableAdapter.Fill(this.admin3000DataSet.Users);

            var cmdString = "select * from Users";

            var dataTable = DbHelper.GetDataTable(cmdString);

            DataGridView dataGridView = new DataGridView();

            
            //OtherForm otherForm = new OtherForm();
            //otherForm.Show();

            MessageBox.Show("（づ￣3￣）づ╭❤～","ooo.ooo");


            //dataGridView1.DataSource = dataTable;

        }

        private void test_MouseClick(object sender, MouseEventArgs e)
        {
            List<Color> colors = new List<Color>();

            colors.Add(Color.Red);
            colors.Add(Color.Black);
            colors.Add(Color.Green);
            colors.Add(Color.Pink);
            colors.Add(Color.Yellow);

            Random random = new Random();

            var randInt = random.Next(0, colors.Count);
            var randColor = colors[randInt];

            BackColor = randColor;
        }
    }
}
